<template>
    <div class="invoice-search">
        <!-- 搜索发票 -->
        <van-search
            v-model="search"
            placeholder="请输入搜索关键词"
            @input="onSearch"
        />
    </div>
</template>

<script>
export default {
    data() {
        return {
            search: "",
        };
    },
    methods: {
        async onSearch(keyword) {
            const res = await this.$http.get("/invoices", {
                params: { keyword },
            });
            this.list = res.data.data;
        },
    },
};
</script>

<style lang="scss" scoped></style>
